<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .main:nth-child(2) {
            /* background-color: #FFF; */
            /* z-index: 5; */
            transform: translateZ(-100px);
        }

        .main:nth-child(3) {
            /* background-color: #FFF; */
            transform: rotateY(90deg) translateZ(100px)
        }

        .main:nth-child(4) {
            /* background-color: #FFF; */
            transform: rotateY(90deg) translateZ(-100px)
        }

        .main:nth-child(5) {
            /* background-color: #FFF; */
            transform: rotateX(90deg) translateZ(100px)
        }

        .main:nth-child(6) {
            /* background-color: #FFF; */
            transform: rotateX(90deg) translateZ(-100px)
        }

        .bigbox {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            position: relative;
            /* 3d动画 */
            transform-style: preserve-3d;
            transform: rotateX(20deg) rotateY(20deg);
        }

        .box {
            width: 20px;
            height: 20px;
            background-color: #000;
            border-radius: 50%;
        }

        .main {
            box-sizing: border-box;
            width: 200px;
            height: 200px;
            /* 弹性布局 */
            display: flex;
            position: absolute;
            border: 2px solid #000;
            top: 50px;
            left: 50px;

        }

        .one {
            justify-content: center;
            align-items: center;
        }

        .two {
            align-items: center;
            justify-content: space-between;
        }

        .three {
            justify-content: space-between;
        }

        .three .box:nth-child(2) {
            /* 单独定义某一个元素居中对齐 */
            align-self: center
        }

        .three .box:nth-child(3) {
            /* 单独定义某一个元素侧轴终边对齐 */
            align-self: flex-end
        }

        .four {
            flex-wrap: wrap;
            justify-content: space-between;
        }

        .four .box:nth-child(1) {
            margin-right: 160px;
        }

        .four .box:nth-child(3) {
            align-self: flex-end
        }

        .four .box:nth-child(4) {
            align-self: flex-end
        }

        .five {
            /* display: flex; */
            flex-wrap: wrap;
            justify-content: space-between;
        }

       
        .five .box:nth-child(3) {
            align-self: center;
            margin-left: 86px;
            margin-right: 86px;
            justify-content: center;
            align-items: center;
        }

        .five .box:nth-child(4) {
            align-self: flex-end;
        }

        .five .box:nth-child(5) {
            align-self: flex-end;
        }

        .six{
            flex-wrap: wrap;
            justify-content: space-between;
        }

        .six .box:nth-child(1) {
            margin-right: 60px;
            /* align-self: flex-end; */
        }

        .six .box:nth-child(2) {
            margin-right: 60px;
            /* align-self: flex-end */
        }

        .six .box:nth-child(4),
        .six .box:nth-child(5),
        .six .box:nth-child(6) {
            align-self: flex-end;
        }


    </style>
</head>

<body>

    <div class="bigbox">
        <div class="main one">
            <div class="box"></div>
        </div>
        <div class="main two">
            <div class="box"></div>
            <div class="box"></div>
        </div>
        <div class="main three">
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
        </div>
        <div class="main four">
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
        </div>
        <div class="main five">
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
        </div>
        <div class="main six">
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
        </div>
    </div>
</body>

</html>